import { createApp } from 'vue'
import ElementPlus from 'element-plus';
import router from './router/index'
import App from './App.vue'
import store ,{key} from './store';
import initSvgIcon from '@/icons/index'
import installElementPlus,{Size} from './plugins/element';
import {ElMessage,ElMessageBox,ElNotification} from 'element-plus';
import 'normalize.css'
import '@/styles/index.scss'
const size = store.state.app.size
const app = createApp(App)
app
 .use(store,key)
 .use(installElementPlus,{size})
 .use(ElementPlus)
 .use(initSvgIcon)
 .use(router)
 .mount('#app')


declare module '@vue/runtime-core'{
    interface ComponentCustomProperties{
        $message: typeof ElMessage;
        $notify: typeof ElNotification;
        $confirm: typeof ElMessageBox.confirm;
        $alert: typeof ElMessageBox.alert;
        $prompt: typeof ElMessageBox.prompt;
        $ELEMENT: {
        size: Size;
        };
    }
}
